﻿using System;
using System.ComponentModel.DataAnnotations;

namespace SportMeetingPlanner.Models
{
    public class Meeting
    {
        [Key]
        public virtual int MeetingId { get; set; }
        [DataType(DataType.Date)]
        public virtual DateTime Date { get; set; }
        public virtual int SportId { get; set; }
        public virtual string Contact { get; set; }
        [RegularExpression("[0-9]+", ErrorMessage = "Telephone number should contain only numbers")]
        public virtual string Telephone { get; set; }
        [Required(ErrorMessage = "Title is required")]
        public virtual string Title { get; set; }
        public virtual string Description { get; set; }
        [Required(ErrorMessage = "Location is required")]
        public virtual string Location { get; set; }
        public virtual Sport Sport { get; set; }
        public virtual String UserName { get; set; }
    }

}